You are here: Building the Model: Advanced Elements > Macros > Run-Time Interface
Defining a run-time interface (RTI) for a macro allows the user to easily change simulation/model parameters before the simulation starts. It also provides an experimental framework for defining multiple scenarios to be run in a batch. See Scenarios for more information. An RTI for a macro allows a macro’s text to be changed by the user whenever a simulation run begins. Since macros are allowed in any expression, this gives the user flexibility to edit most model parameters every time a simulation starts without having to directly edit the model data.
The key difference between a macro with an RTI and one without is that when a simulation begins, a macro defined with an RTI provides a menu that allows users to change only the macros you want them to change. An RTI allows you to request a variety of information to substitute for a macro; from simple values (e.g., the initial value of a location’s capacity) to complex text (e.g., a line of logic). You may create RTI parameters using the dialog box below, accessed through the macros dialog.
Parameter Name This text will identify the parameter represented by this macro. It should consist of text that clearly describes the parameter to be changed, for example, Operation Time. The macro name and the parameter name can be different. This provides more flexibility and allows you to view a more descriptive parameter name when defining scenarios.
Prompt This text will appear if the user decides to change the parameter. You should use it to further specify the information to be entered, for example, "Please enter the amount of time the simulation should run."
Unrestricted Text This option allows the user to enter any text, such as the distribution U(8,2). Note that any text that the user enters will be substituted for the macro name in the model. Therefore, the text the user enters must be syntactically correct and valid anywhere the macro name appears.
Record Range Allows you to enable an arrival or shift record from a range of records. This allows you to test a variety of shift and arrival combinations to find the combination that works best with your model.
Numeric Range This specifies the lower and upper limits for the parameter if the type is numeric.
How to define an RTI for a macro:
1. Select Macros from the Build menu.
2. Type the macro name and click on the Options button.
3. Choose Define from the RTI submenu.
4. Define the Parameter Name and enter the prompt (optional).
5. Select the parameter type: Unrestricted Text, Record Range, or Numeric Range.
6. If the parameter is numeric, enter the lower value in the From box and the upper value in the To box.
7. Click OK.
8. Enter the default text or numeric value in the Macro Text field.
9. Use the macro ID in the model (e.g., in operation or resource usage time).
Please note
When using a record range, be sure to group all arrival and shift records. This will allow you to select which series of records to include in the macro. Note also that when you define an arrival or shift RTI, ProModel adds "ARRIVAL_" or "SHIFT_" to the name to help you identify the macro more easily.